{{ content() }}	
<div id="dialog" title="Basic dialog" style="display: none;">
</div>
<div id="main1">
    <div class="large_wrapper">
        <div class="view_content">
            <div class="leftview">
                <div class="doc_description">

                    <div class="left">
                        <a href="{{url('')}}" itemprop="url">
                            <span id="title"><b>Trang Chủ</b></span>
                        </a>
                    </div>

                    <div class="left">
                        &nbsp;»&nbsp;<a href="{{url('type/search/'~type.id)}}">
                            <span id="title"><b>{{type.name}}</b></span>
                        </a>
                    </div>
                    <div class="left" >
                        &nbsp;»&nbsp;<a href="{{url('topic/search/'~topic.id)}}">
                            <span id="title"><b>{{topic.name}}</b></span>
                        </a>
                    </div>
                    <div style="clear:left"></div>

                    <h1 id="doctitile">{{doc.title}}</h1>
                    <p class="">Chia sẻ bởi: {{user.username}}
                        <span id="ngayupload">| Ngày: <span>{{doc.submit_date}}</span></span><span> | Download: {{doc.download}} </span>
                    </p>
                    <p class="doc_decs f12">

                        <span id="description1">Mô tả: {{doc.description}}</span>

                    </p>
                </div>

                <div class="docread">
                    <div id="top">
                        <div id="title">                            
                            <p>
                                Bạn đang xem một số trang mẫu tài liệu này, vui lòng download file gốc để xem toàn bộ.                            
                            </p>
                        </div>
                        <div id="social-icon">
                            <div id="group">
                                <img src="{{url('public/img/googleplus20.png')}}">
                                <div class="dfav">
                                    <span class="sq">0</span>
                                </div>
                            </div>
                            <div id="group">
                                <img src="{{url('public/img/flike.png')}}">
                                <div class="dfav">
                                    <span class="sq">0</span>
                                </div>
                            </div>
                            <div id="group">
                                <img src="{{url('public/img/fshare.jpg')}}">
                                <div class="dfav">
                                    <span class="sq">0</span>
                                </div>
                            </div>
                        </div>
                    </div>
                     <div id="loadiframe" class="iframe">
                    {% if doc.review %}
                   <embed src="{{url('public/review/'~doc.topic_id~'/'~doc.id~'/'~doc.review)}}" width="100%" height="100%">
                    {% else %}
                    <h2 style="padding:20px;color:red">Tài liệu này không thể xem trước. Vui lòng download để xem đầy đủ tài liệu này</h2>
                    {% endif %}
                    </div>
                    <div id="bottom" class="clearfix">
                        <div style="display:inline-block">
                            <p align="left" style="">Thể loại: <span>{{type.name}}-{{topic.name}}</span></p>
                            <p align="left">
                                Giá tiền: <span>  {% if doc.cost != 0 %} {{doc.cost}} Xu    {% else %} Miễn phí   {% endif %}</span>
                            </p> 					
                        </div>
                        <div style="float:right; display: inline-block; clear:both">
                            <div id="downloadspan" style="display:inline-block"><a href="{{url('doc/download/'~doc.id)}}" class="downloadbtn" id="downloadbtn" data-id="{{doc.id}}" style="float:right;"><img src="{{url('public/img/dowload.png')}}"></a></div>  
                        </div>
                    </div>
                    <div class="facebook_comment">
                        <span>Bình luận qua facebook</span>
                        <div class="fb-plugins">
                            <div class="avar">
                                <img src="{{url('public/img/avartar.jpg')}}">
                            </div>
                            <div class="add_comment">
                                <textarea > Add a comment... </textarea><br>
                                <span><input type="checkbox">Also post on Facebook</span>
                                <span style="float: right"> 
                                    Posting as Du Inzaghi <a href="" style="color: #2E3EF8; text-decoration: underline">(Change)</a> <input type="submit" value="Comment" style="background:#3b5998; color:#fff; font-weight:bold">
                                </span>                                
                            </div>                           
                        </div>
                        <div class="fbFooter">
                            <span><a target="_blank" href="https://developers.facebook.com/docs/plugins/?footer=1" style="color:#9197a3;"> <img src="{{url('public/img/face-ico10.gif')}}"> Facebook social plugin</a></span>
                        </div>
                    </div>

                </div>
            </div>


            <div class="rightview ">
                <div class="advertise">
                    <img src="{{url('public/img/advertise.jpg')}}">
                </div>
                <div class="relate_doc">
                    <div id="titile">
                        <span>Tài liệu liên quan</span>
                    </div>
                    <div class="list_relate">
                        <div class="list_relate">
                            {% for doc in docs %}
                            {% if loop.index % 2 %}
                            <div class="oddrow">
                                {% else %}
                                <div class="evenrow">
                                    {% endif %}
                                    <span class="spanleftrelated">
                                        <a href="{{url('doc/view/'~doc.id)}}">
                                            <img src="{{url('public/review/'~doc.topic_id~'/'~doc.id~'/'~doc.image)}}" title="{{doc.title}}">
                                        </a>
                                    </span>
                                    <span class="spanrightrelated">                                   
                                        <p><a class="doc_title" href="{{url('doc/view/'~doc.id)}}">{{doc.title}}</a></p>
                                        <p>Thể loại: {{type.name}}-{{topic.name}} &nbsp; <img src="{{url('public/img/icon_down.png')}}"> {{doc.download}}</p>

                                    </span>

                                </div>
                                {% endfor %}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{{javascript_include('js/download.js')}}
<!-- ENDS MAIN -->


